#include <iostream>
#include <thread>
#include <unistd.h>
#include"thread.hpp"

using namespace std;

void Print()
{
    while(true)
    {
        printf("haha, 我是一个封装的线程...\n");
        sleep(1);
    }
}

int main()
{
    Thread t(Print);
    t.Run();

    cout << "是否启动成功: " << t.IsRunning() << endl;
    cout << "启动成功时间戳: " << t.StartTimestamp() << endl;
    cout << "线程的名字: " << t.Name() << endl;

    t.Join();
    return 0;
}